<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
	<title>长鹿家园下载</title>
	<link rel="stylesheet" href="https://res.wx.qq.com/open/libs/weui/1.1.2/weui.min.css">
	<!-- <link rel="stylesheet" href="css/base.css"> -->
	<!-- <script type="text/javascript" src="js/jquery-3.0.0.min.js"></script> -->
	<!-- <script type="text/javascript" src="js/base.js"></script> -->
</head>
<style type="text/css" media="screen">
	#header{
		width: 100%;
		height: 100%;
		margin-bottom: 10px;
	}
	#text1{
		font-size: 18px;
		padding-left: 30px;
		color: #f5ab1e;
		margin-bottom: 5px;
	}
	#text2{
		font-size: 14px;
		color: #909090;
		padding-left: 30px;
		margin-bottom: 15px;
	}
	.wrap{
		display: flex;
		justify-content: space-around;
		align-items: center;
		padding: 0 35px;
		text-align: center;
		margin-bottom: 30px;
	}
	.box{
		vertical-align: middle;
		text-align: center;
	}
	.wrap span{
		font-size: 18px;
		color:#f5ab1e;
	}
	.code{
		width: 135px;
		height: 135px;
	}
	.icon{
		width: 66px;
		height: 52;
	}
	.download{
		width: 66px;
		height: 66px;
	}
</style>
<body ontouchstart>
	<div class="container" id="container">
		<img src="img/header.png" alt="" id="header">
		<p id="text1">长鹿家园app下载:</p>
		<p id="text2">★长鹿家园支持iOS、android系统手机使用</p>
		<div class="wrap">
			<div class="box">
				<img src="img/parent.png" alt="" class="icon"><br>
				<span>家长端</span>
			</div>
			<div class="box">
				<img src="img/jiazhang.png" alt="" class="code">
			</div>
			<div class="box" id="download1">
				<img src="img/download.png" alt="" class="download"><br>
				<span>点击下载</span>
			</div>
		</div>
		<div class="wrap">
			<div class="box">
				<img src="img/teacher.png" alt="" class="icon"><br>
				<span>教师端</span>
			</div>
			<div class="box">
				<img src="img/jiaoshi.png" alt="" class="code">
			</div>
			<div class="box" id="download2">
				<img src="img/download.png" alt="" class="download"><br>
				<span>点击下载</span>
			</div>
		</div>
		<div class="wrap">
			<div class="box">
				<img src="img/principal.png" alt="" class="icon"><br>
				<span>园长端</span>
			</div>
			<div class="box">
				<img src="img/yuanzhang.png" alt="" class="code">
			</div>
			<div class="box" id="download3">
				<img src="img/download.png" alt="" class="download"><br>
				<span>点击下载</span>
			</div>
		</div>
	</div>

	<script type="text/javascript" charset="utf-8">
		var  download1 = document.getElementById("download1");

		var  download2 = document.getElementById("download2");

		var  download3 = document.getElementById("download3");

		var  androidParent = 'http://1712206324.fx.sj.360.cn/qcms/view/t/detail?id=3946619';       //安卓家长端下载链接

		var  androidTeacher = 'http://18013145057.fx.sj.360.cn/qcms/view/t/detail?id=3946877';     //安卓教师端下载链接

		var  androidPrincipal = 'http://18040333663.fx.sj.360.cn/qcms/view/t/detail?id=3946878';    //安卓园长端下载链接

		var  iosParent = 'https://itunes.apple.com/cn/app/id1270099481?mt=8';                       //ios家长端下载链接

		var  iosTeacher = 'https://itunes.apple.com/cn/app/id1323849902?mt=8';                   //ios教师端下载链接

		var  iosPrincipal = 'https://itunes.apple.com/cn/app/id1329126083?mt=8';                  //ios园长端下载链接




		download1.onclick = function(){
			// console.log(11);
			testing(androidParent,iosParent);
		}

		download2.onclick = function(){
			// console.log(22);
			testing(androidTeacher,iosTeacher);
		}
		
		download3.onclick = function(){
			// console.log(33);
			testing(androidPrincipal,iosPrincipal);
		}
		

		/*
         * 智能机浏览器版本信息
         */
		function testing(android,ios){
			var browser = {
	            versions: function() {
	                var u = navigator.userAgent, app = navigator.appVersion;
	                return {//移动终端浏览器版本信息
	                    trident: u.indexOf('Trident') > -1, //IE内核
	                    presto: u.indexOf('Presto') > -1, //opera内核
	                    webKit: u.indexOf('AppleWebKit') > -1, //苹果、谷歌内核
	                    gecko: u.indexOf('Gecko') > -1 && u.indexOf('KHTML') == -1, //火狐内核
	                    mobile: !!u.match(/AppleWebKit.*Mobile.*/) || !!u.match(/AppleWebKit/), //是否为移动终端
	                    ios: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), //ios终端
	                    android: u.indexOf('Android') > -1 || u.indexOf('Linux') > -1, //android终端或者uc浏览器
	                    iPhone: u.indexOf('iPhone') > -1 || u.indexOf('Mac') > -1, //是否为iPhone或者QQHD浏览器
	                    iPad: u.indexOf('iPad') > -1, //是否iPad
	                    webApp: u.indexOf('Safari') == -1 //是否web应该程序，没有头部与底部
	                };
	            }(),
	            language: (navigator.browserLanguage || navigator.language).toLowerCase()
	        }

	        if (browser.versions.ios || browser.versions.iPhone || browser.versions.iPad) {
	            window.location=ios;
	        }
	        else if (browser.versions.android) {
	            window.location=android;
	        }
		}
		
        

	</script>
</body>
</html>